export interface RequestConfigInterface {
  name?: string; // 请求别名
  host?: string; // host地址
  successCodes?: any[]; // 成功码
  statusCodes?: { [key: number]: string; }; // 状态码
  errorCodes?: { [key: number]: string; }; // 错误码
  timeout?: number; // 请求超时
  errorCallback?: any; // 请求错误回调函数
  requestBeforeCallback?: any; // 请求前回调函数
  requestAfterCallback?: any; // 请求结束后回调函数
}

export const RequestDefierConfig = {
  name: 'http',
  host: '',
  timeout: 30000,
  successCodes: [0, 200],
  errorCodes: {},
  statusCodes: {},
  errorCallback: (msg: string) => { alert(msg); },
  requestBeforeCallback: undefined,
  requestAfterCallback: undefined,
};
